Flashing is a thin layer of material, usually made from metal, that is used to direct water away from critical areas of a roof. It is installed around various elements such as chimneys, vents, skylights, and along roofs' valleys to prevent water from seeping into the building. Without proper flashing, water can infiltrate the roofing system, leading to potential structural damage, mold growth, and costly repairs.